import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Log from './views/system/Log.vue'
import onlineUser from './views/system/onlineUser.vue'
import Role from './views/system/Role.vue'
import sysParam from './views/system/sysParam.vue'
import Tree from './views/system/Tree.vue'
import Users from './views/system/Users.vue'
import Demo from './views/demo/Table.vue'

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '系统设置',
        iconCls: 'el-icon-setting',
        children: [
            { path: '/users', component: Users, name: '用户管理' },
            { path: '/tree', component: Tree, name: '资源管理' },
            { path: '/role', component: Role, name: '角色管理' },
            { path: '/onlineUser', component: onlineUser, name: '在线用户' },
            { path: '/log', component: Log, name: '行为日志' },
            { path: '/sysParam', component: sysParam, name: '系统参数' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: 'Demo',
        iconCls: 'el-icon-star-on',
        children: [
            { path: '/demo', component: Demo, name: 'Table' },
        ]
    },
    //{ path: '/main', component: Main },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;